Primary Keys are passed from page to page via URL’s in an XML-encoded format. For example, if you have a Show Table page with an Edit button, and you set that Edit button to redirect to another page and pass a primary key on the URL, Iron Speed Designer will generate a URL such as:
http://localhost/MyApp3/Categories/EditCategoriesRecord.aspx?Categories=%3ckey%3e%3ccv%3e%3cc%3eCategoryID%3c%2fc%3e%3cv%3e2%3c%2fv%3e%3c%2fcv%3e%3c%2fkey%3e
The decoded value of the Categories parameter is:
<key><cv><c>CategoryID</c><v>2</v></cv></key>.
This means that the primary key of the record is CategoryID and its value is 2. For records with composite primary keys, you would see other attributes in the XML representing the names and values of the other primary key columns.
You can parse and use the XML-encoded value by overriding the CreateWhereClause() method of the record control.
For a Web Application the customization will be added in:
..\<Application Name>\<Table Name>\Edit<Table Name>.Controls.cs
For example: C:\MyApp1\Customers\EditCustomers.Controls.cs
For a Web Site the customization will be added in:
..\<Application Name>\App_Code\<Table Name>\Edit<Table Name>.Controls.cs
For example: C:\MyApp1\App_Code\Customers\EditCustomers.Controls.cs
|